#pragma once
#include"GLTools.h"
class GLShaderProgram
{
public:
	using Ptr = std::shared_ptr<GLShaderProgram>;

	static std::string loadFromFile(const std::string& file_path_name);
	GLShaderProgram(const std::string& vertex_shader_path, const std::string& fragment_shader_path,bool file_or_src = true);

	uint32_t getProgramID() const{ return _program; }
	bool useProgram();

	void setUniformFloat(const std::string& name, float val);
	void setUniformFloat(const std::string& name, float val, float val2);
	void setUniformFloat(const std::string& name, float val, float val2, float val3);
	void setUniformFloat(const std::string& name, float val, float val2, float val3, float val4);

	void setUniformBool(const std::string& name, bool val);
	void setUniformInt(const std::string& name,int val);

	void setUniformMat4(const std::string& name, const glm::mat4& mat);
private:
	uint32_t _program{ 0 };

};

